﻿@model IEnumerable<HotelManageSystem.Models.ProductCategoryModel>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutWarehouseInstall.cshtml";
}
@section Head
{
     <link href= "@Url.Content("~/Content/TelerikGrid.css")"rel="stylesheet" type="text/css"></link>
}
@{
    Html.Telerik().Grid(Model)
        .Name("ProductCategory")
        .DataKeys(keys=>keys.Add(x=>x.ID))
        .ToolBar(commands=>commands.Insert())
        .DataBinding(dateBinding=>dateBinding.Ajax()
        .Select("TelerikAjax", "ProductCategory")
        .Insert("Insert", "ProductCategory")
        .Update("Update", "ProductCategory")
        .Delete("Delete", "ProductCategory"))
        .Pageable()
        .Sortable()
        .Columns(columns=>
                     {
                         columns.Bound(p => p.Name).Title("类别名");
                         columns.Bound(p => p.Remark).Title("备注");
                         columns.Command(commands =>
                                             {
                                                 commands.Edit();
                                                 commands.Delete();
                                             });
                     })
                     .Editable(editing=>editing.Mode(GridEditMode.PopUp))
                     .Filterable()
                     .Groupable()
                     .Scrollable()
                     .Render();
}